package com.cd.dao;

import java.io.IOException;
import java.util.List;

public class MovieDao {

	// 1. 查询所有电影
	public List<Movie> findAll() throws IOException {
		try(SqlSession session = MybatisUtil.getSqlSession(true)) {
			MovieMapper mapper = session.getMapper(MovieMapper.class);
			return mapper.selectByExample(null);
		}
	}
}